<template>
  <div class="action" @click="act">
    <slot></slot>
  </div>
</template>

<script>
export default {
    props: [ 'action' ],
    methods: {
        act() {
            this.$ws.send(this.action)
        }
    }
}
</script>

<style scoped>
.action {
  cursor: pointer;
  user-select: none;
  padding: 0.25em 1em;
  background-image: linear-gradient(135deg, #ada383, #655b3c);
  color: white;
  border-radius: 5px;
  margin-right: 12px;
  /* width: 3em; */
  text-align: center;
}
</style>